<div class="forms">
  <textarea name="content" cols="" rows="" class="ftextarea focus font14" placeholder="请在这里输入内容"></textarea>
  <input type="hidden" name="bid" value="{$_GET['bid']}">
</div>
<script>
    var reply_nickname= "{$_GET['reply_nickname']}";
    if (reply_nickname){
        $("textarea[name='content']").attr('placeholder','@'+reply_nickname);
    }
    $('.J_confirm').click(function (e) {
        var content = $.trim($("textarea[name='content']").val());
        var bid = $("input[name='bid']").val();

        var btn=$(this);
        if (btn.hasClass('disabled')) {
            return false;
        }
        btn.addClass('disabled');

        if (!content) {
            toast('回复内容不能为空');
            btn.removeClass('disabled');
            return false;
        }
        
        var params = {content:content,bid:bid};
        var bbs_reply_url = '{:U("bbs/ajax_bbs_reply_save")}';
        $.post(bbs_reply_url, params, function(res){
            if (res.code == 0) {
                toast(res.msg);
                btn.removeClass('disabled');
                return false;
            } else {
                toast(res.msg, 1);
                $(".uu_forms_bg,.uu_forms").remove();
                un_lock_touchmove();
                location.reload();
            }
        });
    });
</script>